-- 预留
local config_cc = GetModConfigData("woodie_cc")
-- local config_make = GetModConfigData("woodie_make")
-- local _HasIngredients


local function fn(inst)
    -- local iswer =  inst.player_classified and inst.player_classified.currentwereness and inst.player_classified.currentwereness:value() ~= 0
    -- local hi = inst.replica and inst.replica.builder and inst.replica.builder.HasIngredients 
    
    -- print(_HasIngredients, hi)
    -- if not iswer then
    --     if _HasIngredients and hi then
    --         inst.replica.builder.HasIngredients = _HasIngredients
    --     end
    --     return
    -- end
    local hud = inst.HUD
    if hud then
        local cc = config_cc and hud.beaverOL
        -- local cls = config_make and hud.controls
        if cc then
            cc:Hide()
        end
        -- if cls then
        --     cls:ShowCraftingAndInventory()
        --     cls.craftingandinventoryshown = false
        --     if hi then
        --         local menu = cls.craftingmenu
        --         if menu and hi then
        --             inst.replica.builder.HasIngredients = function()
        --                 return true
        --             end
        --             menu:UpdateRecipes()
        --         end
        --     end
        --     local inv = cls.inv
        --     if inv then
        --         inv:Hide()
        --     end
        -- end
    end
end


AddPlayerActivatedFunc(function(player, world)
    if not player:HasTag("werehuman") then
        return
    end
    -- _HasIngredients = player.replica and player.replica.builder and player.replica.builder.HasIngredients
    player:ListenForEvent("weremodedirty", fn)
    fn(player)
end)